package com.lightjet.macross.base.feign.api.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

// 日志队列配置
@Configuration
public class ApiExecLogRabbitConfig {

    @Bean
    public Queue MacrossLogQueue() {
        return new Queue("ApiExecLogQueue",true);
    }
    @Bean
    DirectExchange MacrossLogExchange() {
        return new DirectExchange("ApiExecLogExchange",true,false);
    }
    @Bean
    Binding BindingDirect(){
        return BindingBuilder.bind(MacrossLogQueue()).to(MacrossLogExchange()).with("macross.apiexec.log");
    }
}
